package gui;

import java.awt.FlowLayout;

import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JTextField;

import physics.Location;

public class LocationInput extends JComponent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private NumberInput x;
	private NumberInput y;
	public LocationInput(String name, Location l) {
		
		x = new NumberInput("X Position", l.getX());
		y = new NumberInput("Y Position", l.getY());
		setLayout(new FlowLayout());
		add(new JLabel(name));
		add(x);
		add(new JLabel(name));
		add(y);
		
	}
	public Location getLoc() {
		double one = x.getNum();
		double two = y.getNum();
		return new Location(one, two);
	}
}
